set(udock_SOURCES ${udock_SOURCES}
udock.cpp
defaultwindowfinder.cpp
)

set(udock_HEADERS ${udock_HEADERS}
udock.h
defaultwindowfinder.h
windowfinder.h
structs.h
)

if(OS MATCHES "linux")
    message(":::::::::::::::::: You are running linux")
    find_package(X11 REQUIRED)
    set(udock_LIBRARIES ${udock_LIBRARIES} ${X11_LIBRARIES})
endif(OS MATCHES "linux")

find_package(Qt4)
if(QT4_FOUND)
    message(":::::::::::::::::: Qt4 found: Building tests and qdock")
    include(${QT_USE_FILE})
    add_definitions(${QT_DEFINITIONS})
    subdirs(tests)
    subdirs(qdock)
endif(QT4_FOUND)

add_library(udock SHARED ${udock_SOURCES}
${udock_SOURCES_MOC} ${udock_SOURCES_UI} ${udock_HEADERS}
)
target_link_libraries(udock ${udock_LIBRARIES} )
